import 'package:flutter/material.dart';

class TextCase extends StatelessWidget {
  const TextCase({super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
      width: 200,
      height: 200,
      color: Colors.blue,
      alignment: Alignment.center,
      child: const Text(
        //换行推荐使用转义字符\n
        '一首诗的名字 \n白居易\n离离原上草, 一岁一枯荣。\n野火烧不尽，春风吹又生。',
        style: TextStyle(
          fontSize: 14,
          color: Colors.white,
          fontStyle: FontStyle.italic,
          fontWeight: FontWeight.bold,
        ),
      ),
    );
  }
}
